﻿<UserControl x:Class="ConfigEditor.View.UserCtrlChosenMeasurements"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="296" d:DesignWidth="481">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*"/>
        </Grid.ColumnDefinitions>
        <DataGrid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="7"
                  ItemsSource="{Binding Path=ChosenMeasurements}"
                  SelectedIndex="{Binding Path=SelectedIndex}"
                  CanUserSortColumns="False"
                  SelectionMode="Single">

            <DataGrid.Columns>
                <DataGridCheckBoxColumn Binding="{Binding Path=IsSelectToRemove}"/>
                <DataGridTextColumn Binding="{Binding Path=Key}" Header="Key" IsReadOnly="True"/>
                <DataGridTextColumn Binding="{Binding Path=Device}" Header="Device" IsReadOnly="True"/>
                <DataGridTextColumn Binding="{Binding Path=SignalReference}" 
                                                Header="SignalReference" 
                                                Width="*"
                                                IsReadOnly="True"/>
                <DataGridTextColumn Binding="{Binding Path=SignalType}" 
                                                Header="SignalType" IsReadOnly="True"/>
                <DataGridTextColumn Binding="{Binding Path=PhasorType}" Header="PhasorType" 
                                                IsReadOnly="True" />
            </DataGrid.Columns>
        </DataGrid>
        <CheckBox Grid.Row="1" Grid.Column="0" Content="All"
                  Command="{Binding Path=SelectAllCmd}"/>
        <Button Grid.Row="1" Grid.Column="4" Content="Up"
                Command="{Binding Path=UpCmd}"/>
        <Button Grid.Row="1" Grid.Column="5" Content="Down"
                Command="{Binding Path=DownCmd}"/>
        <Button Grid.Row="1" Grid.Column="6" Content="Deselect"
                Command="{Binding Path=DeselectCmd}"/>
    </Grid>
</UserControl>
